$OpenBSD: patch-src_ASDocGen_xmlproc_c,v 1.2 2015/06/29 14:46:57 ajacoutot Exp $

xmlproc.c:182:19: warning: multi-character character constant

Fix build on sparc64.

--- src/ASDocGen/xmlproc.c.orig	Wed May  1 15:34:11 2013
+++ src/ASDocGen/xmlproc.c	Mon Jun 29 15:49:03 2015
@@ -179,7 +179,7 @@ write_doc_cdata( const char *cdata, int len, ASXMLInte
 				fputs( "\\&", state->dest_fp );	
 			else if ( c == '\\' && state->doc_type == DocType_NROFF ) 
 				fputc( '\\', state->dest_fp );	
-			else if ( c == '' && state->doc_type == DocType_NROFF ) 
+			else if ( c == 152 /*''*/ && state->doc_type == DocType_NROFF ) 
 				c = '~';
 			fputc( c, state->dest_fp );
 		}		   
@@ -514,9 +514,10 @@ add_glossary_item( xml_elem_t* doc, ASXMLInterpreterSt
 	 	char *target = NULL, *target2 ;
 		char *term = NULL, *term2 ;
 		char *ptr = &(state->dest_file[strlen(state->dest_file)-4]);
+		size_t curr_url_anchor_len = state->curr_url_anchor ? strlen(state->curr_url_anchor) : 0;
 		if( state->doc_type == DocType_PHP && *ptr == '.')
 			*ptr = '\0' ;
-		target = safemalloc( strlen( state->dest_file)+5+1+strlen(state->curr_url_anchor)+1);
+		target = safemalloc( strlen( state->dest_file)+5+1+curr_url_anchor_len+1);
 		sprintf( target, "%s#%s", state->dest_file, state->curr_url_anchor );
 		if( state->doc_type == DocType_PHP && *ptr == '\0' )
 			*ptr = '.' ;
